package com.jp.knowledge.my.model;

import com.jp.knowledge.model.AuthInfo;

import java.io.Serializable;
import java.util.List;

/**
 * Created by 528787067@qq.com on 2016/12/22.
 */

public class OrganizaModel implements Serializable {

    /**
     * auditStete : 1
     * companyType : 1
     * companyManage : 0
     * departmentId : 091e12ee-6ffc-4800-8b55-383691fadb49
     * companyName : 广西
     * companyState : 0
     * companyLevel :
     * auditInfo :
     * companyId : 6dfffe72de0c865f611c1156ac999f29
     * classId :
     * companyFullName : 广西
     * position : 未知职位
     * department : 未知部门
     * companyAdmin : 0
     */

    private List<AuditInfo> auditInfo;
    private AuthInfo authInfo;
    private String className;

    private int auditStete;
    private int companyType;
    private int companyManage;
    private String departmentId;
    private String companyName;
    private int companyState;
    private int isAudit;
    private int dataSort;
    private String companyLevel;
    private String companyId;
    private String classId;
    private String companyFullName;
    private String inviteUrl;
    private String inviteCode;
    private int companyVip;
    private String scoopCover;
    private int state;
    private String position;
    private int id;
    private String department;
    private int companyAdmin;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getInviteUrl() {
        return inviteUrl;
    }

    public void setInviteUrl(String inviteUrl) {
        this.inviteUrl = inviteUrl;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public String getScoopCover() {
        return scoopCover;
    }

    public void setScoopCover(String scoopCover) {
        this.scoopCover = scoopCover;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getIsAudit() {
        return isAudit;
    }

    public void setIsAudit(int isAudit) {
        this.isAudit = isAudit;
    }

    public AuthInfo getAuthInfo() {
        return authInfo;
    }

    public void setAuthInfo(AuthInfo authInfo) {
        this.authInfo = authInfo;
    }

    public int getAuditStete() {
        return auditStete;
    }

    public void setAuditStete(int auditStete) {
        this.auditStete = auditStete;
    }

    public int getCompanyType() {
        return companyType;
    }

    public void setCompanyType(int companyType) {
        this.companyType = companyType;
    }

    public int getCompanyManage() {
        return companyManage;
    }

    public void setCompanyManage(int companyManage) {
        this.companyManage = companyManage;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public int getCompanyState() {
        return companyState;
    }

    public void setCompanyState(int companyState) {
        this.companyState = companyState;
    }

    public String getCompanyLevel() {
        return companyLevel;
    }

    public void setCompanyLevel(String companyLevel) {
        this.companyLevel = companyLevel;
    }

    public int getCompanyVip() {
        return companyVip;
    }

    public void setCompanyVip(int companyVip) {
        this.companyVip = companyVip;
    }

    //    public String getAuditInfo() {
//        return auditInfo;
//    }
//
//    public void setAuditInfo(String auditInfo) {
//        this.auditInfo = auditInfo;
//    }

    public List<AuditInfo> getAuditInfo() {
        return auditInfo;
    }

    public void setAuditInfo(List<AuditInfo> auditInfo) {
        this.auditInfo = auditInfo;
    }

    public int getDataSort() {
        return dataSort;
    }

    public void setDataSort(int dataSort) {
        this.dataSort = dataSort;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getCompanyFullName() {
        return companyFullName;
    }

    public void setCompanyFullName(String companyFullName) {
        this.companyFullName = companyFullName;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public int getCompanyAdmin() {
        return companyAdmin;
    }

    public void setCompanyAdmin(int companyAdmin) {
        this.companyAdmin = companyAdmin;
    }

    public static class AuditInfo implements Serializable{

        /**
         * reason : 佛说阿弥陀经
         * rejectUid : 8d3022c3-e425-4479-97e0-4975df240a3d
         * time : 1492152626153
         */

        private String reason;
        private String rejectUid;
        private long time;


        public String getReason() {
            return reason;
        }

        public void setReason(String reason) {
            this.reason = reason;
        }

        public String getRejectUid() {
            return rejectUid;
        }

        public void setRejectUid(String rejectUid) {
            this.rejectUid = rejectUid;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }
    }

    @Override
    public boolean equals(Object obj) {
        if(obj == null || !(obj instanceof OrganizaModel))
            return false;
        OrganizaModel organizaModel = (OrganizaModel) obj;
        if(organizaModel.getCompanyId() == null || !organizaModel.getCompanyId().equals(getCompanyId()))
            return false;
        if(organizaModel.getCompanyType() == 2
                && (organizaModel.getClassId() == null || !organizaModel.getClassId().equals(getClassId())))
            return false;
        return true;
    }
}
